﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CallBackHandle.aspx.cs" Inherits="CRM.Web.CallBackManage.CallBackHandle" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
    <link href="<%= base.ResourcesPath + "Style/main.css" %>" rel="stylesheet" type="text/css" />
    <link href="<%= base.ResourcesPath + "Style/button.css" %>" rel="stylesheet" type="text/css" />
    <link href="<%= base.ResourcesPath + "Style/pop.css" %>" rel="stylesheet" type="text/css" />    
    <link href="<%= base.ResourcesPath + "Style/ui.tabs.css" %>" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="<%= base.ResourcesPath %>Js/jquery-1.6.2.min.js" ></script>
    <script src="<%= base.ResourcesPath %>Js/ui.core.js" type="text/javascript"></script> 
    <script src="<%= base.ResourcesPath %>Js/ui.tabs.js" type="text/javascript"></script> 
    <script type="text/javascript" src="<%= base.ResourcesPath %>Js/My97DatePicker/WdatePicker.js"  defer="defer" ></script>
    <script type="text/javascript" src="<%= base.ResourcesPath %>Js/MaskTextBox.js" ></script>
    <script type="text/javascript" src="<%= base.ResourcesPath %>Js/Common.js"></script>
    <script type="text/javascript" src="<%= base.ResourcesPath %>Js/button.js"></script>
    
    <script type="text/javascript">
        $(document).ready(function() {
            ResetIFrameHeight(0);
        });


    //刷新iFrame高度
    function ResetIFrameHeight(height) {
        if (height == null) {
            return;
        }
        var customerHeight = $('#tCallBackInfo').height();
        var customerTitleHeight = $('#tCallBackInfoTitle').height();
        var addCase = $('.addCallBack').height();
        var ifameHeight = height + customerHeight + addCase + customerTitleHeight + 35;
        window.parent.document.getElementById('frameCallBack').style.height = ifameHeight + 'px';
    }

    function getCallId() {
        var softPhone = window.parent.opener.parent.frameSoftPhone;
        if (softPhone != null) {
            var callId = softPhone.GetCallID();
            var tel = softPhone.GetTelNumber();
            $('.txtCALLID').val(callId);
            if ($('.txtCONTACTNUMBER').val().length == 0) {
                $('.txtCONTACTNUMBER').val(tel);
            }
        }
        if (Page_ClientValidate()) {
            return true;
        }        
    }

    function Complete(obj) {
        alert(obj);
        window.parent.frameHistory.location.href = window.parent.frameHistory.location.href;
        window.location.href = window.location.href;
    }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div style="width: 100%">
        <asp:PlaceHolder ID="phCallBackInfo" runat="server">
            <table border="0" cellpadding="0" cellspacing="0" class="tTitleBlue" id="tCallBackInfoTitle" >
                <tr>
                    <td class="left">
                        <img src="<%= base.ResourcesPath %>Images/pop/pop_title_left_blue.gif" alt="" />
                    </td>
                    <td class="middle">
                        <div class="pagetitle">
                            <div>
                                外呼任务 <span style="margin-left: 220px;"><img src="<%= base.ResourcesPath %>Images/SoftPhone/tel_logo.png" alt="" />【客户编号：<asp:Label runat="server" ID="lblCustomerID"></asp:Label>】
                                【任务编号：<asp:Label id="lblTaskId" runat="server"></asp:Label>】</span>
                           </div>
                        </div>
                    </td>
                    <td class="right">
                        <img src="<%= base.ResourcesPath %>Images/pop/pop_title_right_blue.gif" alt="" />
                    </td>
                </tr>
            </table>
            <table id="tCallBackInfo" border="0" cellpadding="0" cellspacing="0" class="table" style="margin-top: 10px;">
                <caption ></caption> 
                    <tr>
                        <td class="title">
                            <div class="nowrap">
                                客户姓名:</div>
                        </td>
                        <td class="content">
                            <asp:TextBox ID="txtCUSTOMERNAME" runat="server" CssClass="txt" MaxLength="150" Rows="3"
                                TextMode="SingleLine"></asp:TextBox><asp:RequiredFieldValidator ID="rfvCUSTOMERNAME"
                                    runat="server" ErrorMessage="*" Display="Dynamic" ControlToValidate="txtCUSTOMERNAME"
                                    Enabled="False"></asp:RequiredFieldValidator>
                        </td>
                        <td class="title">
                            <div class="nowrap">
                                呼叫标识:</div>
                        </td>
                        <td class="content">
                            <asp:TextBox ID="txtCALLID" runat="server" CssClass="txt txtCALLID">
                            </asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="title">
                            <div class="nowrap">
                                联络号码:</div>
                        </td>
                        <td class="content">
                            <asp:TextBox ID="txtCONTACTNUMBER" runat="server" CssClass="txt txtCONTACTNUMBER" MaxLength="17" Rows="3"
                                TextMode="SingleLine"></asp:TextBox><asp:RequiredFieldValidator ID="rfvCONTACTNUMBER"
                                    runat="server" ErrorMessage="*" Display="Dynamic" ControlToValidate="txtCONTACTNUMBER"
                                    Enabled="False"></asp:RequiredFieldValidator>
                        </td>
                        <td class="title">
                            <div class="nowrap">
                                <span class="mark">*</span>联络结果:</div>
                        </td>
                        <td class="content">
                            <asp:DropDownList ID="ddlCASE_STATUS" runat="server" CssClass="ddl" MaxLength="19" Rows="3"
                                TextMode="SingleLine"></asp:DropDownList><asp:RequiredFieldValidator ID="rfvCASE_STATUS"
                                    runat="server" ErrorMessage="*" Display="Dynamic" ControlToValidate="ddlCASE_STATUS"
                                    Enabled="True"></asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td class="title">
                            <div class="nowrap">
                                描述信息:</div>
                        </td>
                        <td class="content" colspan="3">
                            <asp:TextBox ID="txtREMARKS" runat="server" CssClass="txt txt90" MaxLength="500" Rows="3"
                                TextMode="MultiLine"></asp:TextBox><asp:RequiredFieldValidator ID="rfvREMARKS" runat="server"
                                    ErrorMessage="*" Display="Dynamic" ControlToValidate="txtREMARKS" Enabled="False"></asp:RequiredFieldValidator>
                        </td>
                    </tr>
                <tr>
                    <td class="title">
                        <div class="nowrap">
                            是否已购机:</div>
                    </td>
                    <td class="content">
                        <asp:DropDownList ID="ddlISHASPURCHASE" runat="server" CssClass="ddl">
                        </asp:DropDownList>
                        <asp:RequiredFieldValidator ID="rfvISHASPURCHASE" runat="server" ErrorMessage="*"
                            Display="Dynamic" ControlToValidate="ddlISHASPURCHASE" Enabled="False"></asp:RequiredFieldValidator>
                    </td>
                    <td class="title">
                        <div class="nowrap">
                            客户购车信息来源:</div>
                    </td>
                    <td class="content">
                        <asp:DropDownList ID="ddlSOURCE" runat="server" CssClass="ddl">
                        </asp:DropDownList>
                        <asp:RequiredFieldValidator ID="rfvSOURCE" runat="server" ErrorMessage="*" Display="Dynamic"
                            ControlToValidate="ddlSOURCE" Enabled="False"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class="title">
                        <div class="nowrap">
                            客户原因分析:</div>
                    </td>
                    <td class="content">
                        <asp:DropDownList ID="ddlCAUSEANALYSIS" runat="server" CssClass="ddl">
                        </asp:DropDownList>
                        <asp:RequiredFieldValidator ID="rfvCAUSEANALYSIS" runat="server" ErrorMessage="*"
                            Display="Dynamic" ControlToValidate="ddlCAUSEANALYSIS" Enabled="False"></asp:RequiredFieldValidator>
                    </td>
                    <td class="title">
                        <div class="nowrap">
                        </div>
                    </td>
                    <td class="content">
                    </td>
                </tr>
            </table>            
            <div style="width: 100%">
                <div class="btndiv notPrint addCallBack">
		            <span class="btnspan"><asp:Button ID="btnOver" runat="server" Text="完 成"  CausesValidation="False" CommandName="CallBackTaskOver" OnClientClick="getCallId();"  CssClass="btn title_qd" OnClick="btnOK_Click" /></span>
		            <span class="btnspan"><asp:Button ID="btnSave" runat="server" Text="保 存" CausesValidation="False"  CommandName="CallBackTaskSave" OnClientClick="getCallId();"  CssClass="btn title_qd" OnClick="btnOK_Click" /></span>
		            <span class="btnspan"><input id="btnClose"  type="button" value="关 闭" class="btnwrite" onclick="closeParent();" /></span>
		            <span class="btnspan"><input id="btnPrint" type="button" value="打 印" class="btnwrite " /></span>
	            </div>
            </div>
        </asp:PlaceHolder>
    </div>
    <asp:TextBox ID="txtGPSUrl" runat="server" style="display: none;"></asp:TextBox>
    </form>
</body>
</html>
